using System;
using System.Collections.Generic;
using System.Text;

namespace DiggTools
{
    /// <summary>
    /// This class represents a collections of activites including information about the sum of the activites within it (total diggs and comments) within a givin period
    /// </summary>
    public class ActivityGroup
    {
        /// <summary>
        /// Constructor that initializes information about the activity group
        /// </summary>
        /// <param name="period">The period for this activity group</param>
        /// <param name="diggs">The number of total diggs of this period of time</param>
        /// <param name="comments">The number of total comments of this period of time</param>
        /// <param name="start">The start date for this activity group</param>
        /// <param name="end">The end date for this activity group</param>
        public ActivityGroup(String period, int diggs, int comments, DateTime start, DateTime end)
        {
            _activities = new List<Activity>();
            _period = period;
            _diggs = diggs;
            _comments = comments;
            _start = start;
            _end = end;
        }

        /// <summary>
        /// Add an activity to this activity group
        /// </summary>
        /// <param name="theActivity">The adtivity to add to this activity group</param>
        public void AddActivity(Activity theActivity)
        {
            _activities.Add(theActivity);
        }

        /// <summary>
        /// Gets a list of activities contained in this activity group
        /// </summary>
        /// <returns>The list of activities</returns>
        public List<Activity> GetActivities()
        {
            return _activities;
        }

        /// <summary>
        /// Gets the period for this activity group
        /// </summary>
        /// <returns>The period for this activity group</returns>
        public String getPeriod()
        {
            return _period;
        }

        /// <summary>
        /// Gets the total number of diggs for this activity group
        /// </summary>
        /// <returns>The number of diggs</returns>
        public int getDiggs()
        {
            return _diggs;
        }

        /// <summary>
        /// Gets the total number of comments for this activity group
        /// </summary>
        /// <returns>The number of comments</returns>
        public int getComments()
        {
            return _comments;
        }

        /// <summary>
        /// Gets the start date for this activity period
        /// </summary>
        /// <returns>The start date</returns>
        public DateTime getStart()
        {
            return _start;
        }

        /// <summary>
        /// Gets the end date for this activity group
        /// </summary>
        /// <returns>The end date</returns>
        public DateTime getEnd()
        {
            return _end;
        }

        private String _period;
        private int _diggs;
        private int _comments;
        private DateTime _start;
        private DateTime _end;
        private List<Activity> _activities;
    }
}
